import { defineConfig } from 'vite';
import viteDistZip from 'vite-plugin-dist-zip';

export default defineConfig({
  plugins: [
    viteDistZip({
      // 基本配置
      fileName: 'my-project.zip',
      sourceDir: 'dist',
      outputDir: 'dist',
      
      // OSS 上传配置
      oss: {
        region: 'oss-cn-hangzhou',
        accessKeyId: process.env.OSS_ACCESS_KEY_ID,
        accessKeySecret: process.env.OSS_ACCESS_KEY_SECRET,
        bucket: 'my-bucket',
        objectKey: 'releases/my-project.zip' // 可选
      }
    })
  ]
});